&&は||よりも優先順位が高い
code:ruby
true || true && false
#=>
true
これは次のように書いたのと同じ意味になる。
code:ruby
true || (true && false)
#=>
true
ただし、
and
と
not
には優先順位がないので、左から順に処理される。
code:ruby
true or true and false
#=>
false
#Ruby